package com.luoran.bartalks.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.luoran.bartalks.action.vo.MaterialMoveVo;
import com.luoran.bartalks.dao.IBtContainerDao;
import com.luoran.bartalks.dao.IBtMaterialMoveVoDao;
import com.luoran.bartalks.dao.IBtOperationLogDao;
import com.luoran.bartalks.dao.IBtPlanBizDao;
import com.luoran.bartalks.dao.IBtPlanDetailsDao;
import com.luoran.bartalks.dao.IBtPlanEntryDao;
import com.luoran.bartalks.dao.IBtProjectDao;
import com.luoran.bartalks.dao.IBtProjectMemberDao;
import com.luoran.bartalks.dao.IBtRuleRecordDao;
import com.luoran.bartalks.entity.biz.BtContainer;
import com.luoran.bartalks.entity.biz.BtOperationLog;
import com.luoran.bartalks.entity.biz.BtPlanBiz;
import com.luoran.bartalks.entity.biz.BtPlanDetails;
import com.luoran.bartalks.entity.biz.BtPlanEntry;
import com.luoran.bartalks.entity.biz.BtProject;
import com.luoran.bartalks.entity.biz.BtProjectMember;
import com.luoran.bartalks.entity.biz.BtRuleRecord;
import com.luoran.bartalks.service.IWorkbenchService;

@Service
public class WorkbenchService implements IWorkbenchService {

	@Autowired
	private IBtMaterialMoveVoDao IBtMaterialMoveVoDao;
	@Autowired
	private IBtProjectDao iBtProjectDao;
	@Autowired
	private IBtProjectMemberDao iBtProjectMemberDao;
	@Autowired
	private IBtOperationLogDao iBtOperationLogDao;
	@Autowired
	private IBtPlanDetailsDao iBtPlanDetailsDao;
	@Autowired
	private IBtPlanEntryDao iBtPlanEntryDao;
	@Autowired
	private IBtRuleRecordDao iBtRuleRecordDao;
	@Autowired
	private IBtPlanBizDao IBtPlanBizDao;
	@Autowired
	private IBtContainerDao iBtContainerDao;

	@Override
	public List<BtProject> queryProjectByCompanyIdOfWorkbench(String CompanyId,int startRow,int started) {
		return iBtProjectDao.queryProjectByCompanyIdOfWorkbench(CompanyId,startRow,started);
	}
	
	@Override
	public List<BtProjectMember> getProjectMemberByProjectIdAndMembertype(String projectId,int membertype) {
		return iBtProjectMemberDao.getProjectMemberByProjectIdAndMembertype(projectId,membertype);
	}

	@Override
	public List<BtOperationLog> queryUserlogByCompanyId(String companyId,int startRow) {
		return iBtOperationLogDao.queryUserlogByCompanyId(companyId,startRow);
	}

	@Override
	public List<MaterialMoveVo> queryMaterialMoveByProjectId(String projectId,int startRow) {
		return IBtMaterialMoveVoDao.queryMaterialMoveByProjectId(projectId,startRow);
	}

	@Override
	public List<BtPlanDetails> queryPlanByProjectIdOfWorkbench(String projectId,int startRow) {
		return iBtPlanDetailsDao.queryPlanByProjectIdOfWorkbench(projectId,startRow);
	}

	@Override
	public List<BtPlanEntry> getPlanEntryByPlanIdOfWorkbench(String planId) {
		return iBtPlanEntryDao.getPlanEntryByPlanIdOfWorkbench(planId);
	}

	@Override
	public List<BtRuleRecord> queryRuleRecordByProjectId(String companyId,int startRow) {
		return iBtRuleRecordDao.queryRuleRecordByProjectId(companyId,startRow);
	}

	@Override
	public List<BtPlanBiz> findArrive(String projectId, String planId, String planPositionId) {
		return IBtPlanBizDao.findArrive(projectId, planId, planPositionId);
	}

	@Override
	public List<BtPlanEntry> getPlanEntryException(String planId) {
		return iBtPlanEntryDao.getPlanEntryException(planId);
	}
	

	@Override
	public BtContainer findContainerTypeById(String containerId) {
		return iBtContainerDao.findContainerTypeById(containerId);
	}

	@Override
	public BtPlanEntry getPlanEntryByPlanIdAndSign(String planId, String companyId, int sign) {
		return iBtPlanEntryDao.getPlanEntryByPlanIdAndSign(planId, companyId, sign);
	}

}
